\(\int \frac {x^4}{4+4 x+x^2} \, dx\) [2266]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 29 \[ \int \frac {x^4}{4+4 x+x^2} \, dx=12 x-2 x^2+\frac {x^3}{3}-\frac {16}{2+x}-32 \log (2+x) \]

[Out]

12*x-2*x^2+1/3*x^3-16/(2+x)-32*ln(2+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {27, 45} \[ \int \frac {x^4}{4+4 x+x^2} \, dx=\frac {x^3}{3}-2 x^2+12 x-\frac {16}{x+2}-32 \log (x+2) \]

[In]

Int[x^4/(4 + 4*x + x^2),x]

[Out]

12*x - 2*x^2 + x^3/3 - 16/(2 + x) - 32*Log[2 + x]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps \begin{align*} \text {integral}& = \int \frac {x^4}{(2+x)^2} \, dx \\ & = \int \left (12-4 x+x^2+\frac {16}{(2+x)^2}-\frac {32}{2+x}\right ) \, dx \\ & = 12 x-2 x^2+\frac {x^3}{3}-\frac {16}{2+x}-32 \log (2+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.03 \[ \int \frac {x^4}{4+4 x+x^2} \, dx=\frac {1}{3} \left (104+36 x-6 x^2+x^3-\frac {48}{2+x}-96 \log (2+x)\right ) \]

[In]

Integrate[x^4/(4 + 4*x + x^2),x]

[Out]

(104 + 36*x - 6*x^2 + x^3 - 48/(2 + x) - 96*Log[2 + x])/3

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.97

method result size
default \(12 x -2 x^{2}+\frac {x^{3}}{3}-\frac {16}{2+x}-32 \ln \left (2+x \right )\) \(28\)
risch \(12 x -2 x^{2}+\frac {x^{3}}{3}-\frac {16}{2+x}-32 \ln \left (2+x \right )\) \(28\)
norman \(\frac {8 x^{2}-\frac {4}{3} x^{3}+\frac {1}{3} x^{4}-64}{2+x}-32 \ln \left (2+x \right )\) \(31\)
meijerg \(\frac {4 x \left (\frac {5}{8} x^{3}-\frac {5}{2} x^{2}+15 x +60\right )}{15 \left (1+\frac {x}{2}\right )}-32 \ln \left (1+\frac {x}{2}\right )\) \(35\)
parallelrisch \(-\frac {-x^{4}+4 x^{3}+96 \ln \left (2+x \right ) x -24 x^{2}+192+192 \ln \left (2+x \right )}{3 \left (2+x \right )}\) \(38\)

[In]

int(x^4/(x^2+4*x+4),x,method=_RETURNVERBOSE)

[Out]

12*x-2*x^2+1/3*x^3-16/(2+x)-32*ln(2+x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.17 \[ \int \frac {x^4}{4+4 x+x^2} \, dx=\frac {x^{4} - 4 \, x^{3} + 24 \, x^{2} - 96 \, {\left (x + 2\right )} \log \left (x + 2\right ) + 72 \, x - 48}{3 \, {\left (x + 2\right )}} \]

[In]

integrate(x^4/(x^2+4*x+4),x, algorithm="fricas")

[Out]

1/3*(x^4 - 4*x^3 + 24*x^2 - 96*(x + 2)*log(x + 2) + 72*x - 48)/(x + 2)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83 \[ \int \frac {x^4}{4+4 x+x^2} \, dx=\frac {x^{3}}{3} - 2 x^{2} + 12 x - 32 \log {\left (x + 2 \right )} - \frac {16}{x + 2} \]

[In]

integrate(x**4/(x**2+4*x+4),x)

[Out]

x**3/3 - 2*x**2 + 12*x - 32*log(x + 2) - 16/(x + 2)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.93 \[ \int \frac {x^4}{4+4 x+x^2} \, dx=\frac {1}{3} \, x^{3} - 2 \, x^{2} + 12 \, x - \frac {16}{x + 2} - 32 \, \log \left (x + 2\right ) \]

[In]

integrate(x^4/(x^2+4*x+4),x, algorithm="maxima")

[Out]

1/3*x^3 - 2*x^2 + 12*x - 16/(x + 2) - 32*log(x + 2)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.97 \[ \int \frac {x^4}{4+4 x+x^2} \, dx=\frac {1}{3} \, x^{3} - 2 \, x^{2} + 12 \, x - \frac {16}{x + 2} - 32 \, \log \left ({\left | x + 2 \right |}\right ) \]

[In]

integrate(x^4/(x^2+4*x+4),x, algorithm="giac")

[Out]

1/3*x^3 - 2*x^2 + 12*x - 16/(x + 2) - 32*log(abs(x + 2))

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.93 \[ \int \frac {x^4}{4+4 x+x^2} \, dx=12\,x-32\,\ln \left (x+2\right )-\frac {16}{x+2}-2\,x^2+\frac {x^3}{3} \]

[In]

int(x^4/(4*x + x^2 + 4),x)

[Out]

12*x - 32*log(x + 2) - 16/(x + 2) - 2*x^2 + x^3/3